package biz.obake.team.touchprotector.ui;

import android.os.Bundle;
import android.widget.SeekBar;
import android.widget.TextView;
import androidx.appcompat.app.c;
import biz.obake.team.touchprotector.R;

public class NotifLockDelayActivity extends c {
    private TextView t;
    private SeekBar u;

    class a implements SeekBar.OnSeekBarChangeListener {
        a() {
        }

        public void onProgressChanged(SeekBar seekBar, int i, boolean z) {
            biz.obake.team.touchprotector.g.a.q("notif_lock_delay", i * 500);
            NotifLockDelayActivity.this.H();
        }

        public void onStartTrackingTouch(SeekBar seekBar) {
        }

        public void onStopTrackingTouch(SeekBar seekBar) {
        }
    }

    /* access modifiers changed from: private */
    public void H() {
        int j = biz.obake.team.touchprotector.g.a.j("notif_lock_delay") / 500;
        if (j < 0) {
            j = 0;
        }
        if (j > this.u.getMax()) {
            j = this.u.getMax();
        }
        this.u.setProgress(j);
        this.t.setText(biz.obake.team.touchprotector.c.w(R.string.pref_notif_lock_delay_summary).replace("{0}", Double.toString(((double) biz.obake.team.touchprotector.g.a.j("notif_lock_delay")) / 1000.0d)));
    }

    /* access modifiers changed from: protected */
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView((int) R.layout.notif_lock_delay_activity);
        this.t = (TextView) findViewById(R.id.delayText);
        this.u = (SeekBar) findViewById(R.id.delayBar);
    }

    /* access modifiers changed from: protected */
    public void onPause() {
        super.onPause();
    }

    /* access modifiers changed from: protected */
    public void onResume() {
        super.onResume();
        this.u.setOnSeekBarChangeListener(new a());
        H();
    }
}
